
<div XXXXng-controller='testController'>
        <table cellpadding="0" cellspacing="0">
            <tr>
                <td><div style="width:260px"></div></td>                
                <td></td>
                <td><div style="width:260px"></div></td>                
                <td></td>
                <td><div style="width:300px"></div></td>                
                <td></td>
                <td><div style="width:260px"></div></td>                
            </tr>
            <tr>

                <td>
                    <div  class=" smooth-panel" ng-class='smooth-panel-select'  >    
                        <b>Fields</b>    <input ng-model="fieldFilter" placeholder="Search..."/>    
                        <div ng-repeat="e in fieldsall | filter:fieldFilter">        
                            <a ng-href="#/field/{{e.id}}" > &nbsp; {{ e.aid }} {{ e.mapid }} &nbsp; {{ e.username }} {{ e.name }} &nbsp;</a>    
                        </div>
                    </div>                
                            
                </td>
                <td>
                    <div  class='smooth-panel-select' ng-class="{ 'smooth-panel-edit' : fieldEditing }">
                        <h2>Field {{field.name}}</h2>
                        <form name="fieldForm" novalidate>
                            <table>
                                <tr><td>Name </td><td><input type='text' ng-model='field.name' ng-disabled="!fieldEditing" /></td></tr>
                                <tr><td>Location </td><td><input type='text' ng-model='field.location' ng-disabled="!fieldEditing" /></td></tr>
                                <tr><td>Surface </td><td><input type='text' ng-model='field.surface' ng-disabled="!fieldEditing" /></td></tr>
                                <tr><td>Use </td><td><input type='text' ng-model='field.class' ng-disabled="!fieldEditing" /></td></tr>
                                <tr><td>Slots </td><td>
                                        <div ng-repeat="s in field.slots">                                            
                                            <div ng-hide="!fieldEditing"><input type='text' ng-model='s'  /></div>                                            
                                            <div ng-hide="fieldEditing">{{s}}</div>
                                        </div>
                                    </td></tr>
                            </table>

                            <button class='btn btn-default btn-xs active' ng-click="edit   ('field')" ng-disabled=" fieldEditing"                         >Edit</button>
                            <button class='btn btn-default btn-xs active' ng-click="cancel ('field')" ng-hide="!fieldEditing"                         >Cancel</button>
                            <button class='btn btn-default btn-xs active' ng-click="save   ('field')" ng-hide="!fieldEditing || fieldForm.$invalid"   >Save</button>
                            <br/>
                            <button class='btn btn-default btn-xs active' ng-click="destroy('field')" ng-disabled=" fieldEditing"                         >Delete</button>

                        </form>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp; 
                </td>
            </tr>
        </table>
    </div>
